<template>
  <div id="app">
    <div id="nav" ref="header" :class="{ nav_fixed: isFixed }">
      <header-view></header-view>
    </div>
    <template v-if="show">
      <tag-header></tag-header>
    </template>
    <el-container>
      <!-- 内容 -->
      <el-main class="main">
        <el-row>
          <el-col :span="24" class="col3">
            <!-- <transition name="el-fade-in el-fade-in-linear"> -->
            <transition name="el-zoom-in-center el-zoom-in-top">
              <router-view :key="key" />
            </transition>
          </el-col>
        </el-row>
      </el-main>
      <!-- 侧边栏 -->

      <el-aside>
        <transition name="el-zoom-in-center el-zoom-in-top">
          <router-view name="asidemenu"> </router-view>
        </transition>
      </el-aside>
    </el-container>
    <!-- 底栏 -->
    <hr />
    <el-footer height="30px">&copy;ETC大连售前与研发部</el-footer>
  </div>
</template>
<script>

import HeaderView from './components/Header.vue'
import TagHeader from './components/TagHeader.vue'
export default {
  components: {HeaderView, TagHeader},
  data() {
    return {
      isFixed: true,
      show: true,
      username: undefined,
      navList: [
        { name: "/", navItem: "技术" },
        { name: "/about", navItem: "前端" },
        { name: "/about1", navItem: "后端" },
        { name: "/hello", navItem: "学习" },
        { name: "/Markdown", navItem: "发包" },
        { name: "/reource", navItem: "资源" },
        { name: "/neitui", navItem: "内推" },
      ],
    }
  },
  computed: {
    key() {
      return this.$route.name !== undefined
        ? this.$route.name + +new Date()
        : this.$route + +new Date();
    },
  },
}
</script>
<style>
body {
  background-color: rgb(200, 219, 219);
}

aside {
  margin-left: 40px;
  width: 600px;
}

#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin: 0;
  min-width: 600px;
  margin: 0 auto;
}


#nav {
  padding: 0px;
  /* position: sticky; */
  width: 100%;
}

#nav a {
  font-weight: bold;
  color: #2c3e50;
}

#nav a.router-link-exact-active {
  color: #42b983;
}

body {
  margin: 0px;
}

.main {
  background-color: white;
}

.show {
  display: none;
}

</style>
